/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.himilco.test;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author oussema
 */
@Entity
@Table(name = "atmincidents_countries")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "AtmincidentsCountries.findAll", query = "SELECT a FROM AtmincidentsCountries a"),
    @NamedQuery(name = "AtmincidentsCountries.findByCountryId", query = "SELECT a FROM AtmincidentsCountries a WHERE a.countryId = :countryId"),
    @NamedQuery(name = "AtmincidentsCountries.findByCountryName", query = "SELECT a FROM AtmincidentsCountries a WHERE a.countryName = :countryName"),
    @NamedQuery(name = "AtmincidentsCountries.findByCountryDescription", query = "SELECT a FROM AtmincidentsCountries a WHERE a.countryDescription = :countryDescription"),
    @NamedQuery(name = "AtmincidentsCountries.findByCreateUid", query = "SELECT a FROM AtmincidentsCountries a WHERE a.createUid = :createUid"),
    @NamedQuery(name = "AtmincidentsCountries.findByUpdateUid", query = "SELECT a FROM AtmincidentsCountries a WHERE a.updateUid = :updateUid"),
    @NamedQuery(name = "AtmincidentsCountries.findByCreateTs", query = "SELECT a FROM AtmincidentsCountries a WHERE a.createTs = :createTs"),
    @NamedQuery(name = "AtmincidentsCountries.findByUpdateTs", query = "SELECT a FROM AtmincidentsCountries a WHERE a.updateTs = :updateTs")})
public class AtmincidentsCountries implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "COUNTRY_ID")
    private Integer countryId;
    @Size(max = 50)
    @Column(name = "COUNTRY_NAME")
    private String countryName;
    @Size(max = 300)
    @Column(name = "COUNTRY_DESCRIPTION")
    private String countryDescription;
    @Column(name = "CREATE_UID")
    private Integer createUid;
    @Column(name = "UPDATE_UID")
    private Integer updateUid;
    @Basic(optional = false)
    @NotNull
    @Column(name = "CREATE_TS")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createTs;
    @Basic(optional = false)
    @NotNull
    @Column(name = "UPDATE_TS")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTs;

    public AtmincidentsCountries() {
    }

    public AtmincidentsCountries(Integer countryId) {
        this.countryId = countryId;
    }

    public AtmincidentsCountries(Integer countryId, Date createTs, Date updateTs) {
        this.countryId = countryId;
        this.createTs = createTs;
        this.updateTs = updateTs;
    }

    public Integer getCountryId() {
        return countryId;
    }

    public void setCountryId(Integer countryId) {
        this.countryId = countryId;
    }

    public String getCountryName() {
        return countryName;
    }

    public void setCountryName(String countryName) {
        this.countryName = countryName;
    }

    public String getCountryDescription() {
        return countryDescription;
    }

    public void setCountryDescription(String countryDescription) {
        this.countryDescription = countryDescription;
    }

    public Integer getCreateUid() {
        return createUid;
    }

    public void setCreateUid(Integer createUid) {
        this.createUid = createUid;
    }

    public Integer getUpdateUid() {
        return updateUid;
    }

    public void setUpdateUid(Integer updateUid) {
        this.updateUid = updateUid;
    }

    public Date getCreateTs() {
        return createTs;
    }

    public void setCreateTs(Date createTs) {
        this.createTs = createTs;
    }

    public Date getUpdateTs() {
        return updateTs;
    }

    public void setUpdateTs(Date updateTs) {
        this.updateTs = updateTs;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (countryId != null ? countryId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AtmincidentsCountries)) {
            return false;
        }
        AtmincidentsCountries other = (AtmincidentsCountries) object;
        if ((this.countryId == null && other.countryId != null) || (this.countryId != null && !this.countryId.equals(other.countryId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.himilco.test.AtmincidentsCountries[ countryId=" + countryId + " ]";
    }
    
}
